{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "tf_list_local_devices.ipynb",
      "provenance": [],
      "collapsed_sections": [],
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "accelerator": "GPU"
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/wduo/AlphaPose/blob/master/tf_list_local_devices.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Mvx2eWvXK3-b",
        "colab_type": "code",
        "outputId": "153314c7-fdd4-4e34-e215-4b3c4155e78e",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 235
        }
      },
      "source": [
        "import tensorflow as tf\n",
        "from tensorflow.python.client import device_lib\n",
        "device_lib.list_local_devices()"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "[name: \"/device:CPU:0\"\n",
              " device_type: \"CPU\"\n",
              " memory_limit: 268435456\n",
              " locality {\n",
              " }\n",
              " incarnation: 8201058373069862247, name: \"/device:GPU:0\"\n",
              " device_type: \"GPU\"\n",
              " memory_limit: 356515840\n",
              " locality {\n",
              "   bus_id: 1\n",
              " }\n",
              " incarnation: 12815927390560597639\n",
              " physical_device_desc: \"device: 0, name: Tesla K80, pci bus id: 0000:00:04.0, compute capability: 3.7\"]"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 4
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "1gJE7P7kJuXG",
        "colab_type": "code",
        "outputId": "8468c4b1-e5b9-42ce-feac-f69d30426785",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 516
        }
      },
      "source": [
        "import tensorflow as tf\n",
        "from tensorflow.python.client import device_lib\n",
        "device_lib.list_local_devices()\n"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/html": [
              "<p style=\"color: red;\">\n",
              "The default version of TensorFlow in Colab will soon switch to TensorFlow 2.x.<br>\n",
              "We recommend you <a href=\"https://www.tensorflow.org/guide/migrate\" target=\"_blank\">upgrade</a> now \n",
              "or ensure your notebook will continue to use TensorFlow 1.x via the <code>%tensorflow_version 1.x</code> magic:\n",
              "<a href=\"https://colab.research.google.com/notebooks/tensorflow_version.ipynb\" target=\"_blank\">more info</a>.</p>\n"
            ],
            "text/plain": [
              "<IPython.core.display.HTML object>"
            ]
          },
          "metadata": {
            "tags": []
          }
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "[name: \"/device:CPU:0\"\n",
              " device_type: \"CPU\"\n",
              " memory_limit: 268435456\n",
              " locality {\n",
              " }\n",
              " incarnation: 10762173960597845, name: \"/device:XLA_CPU:0\"\n",
              " device_type: \"XLA_CPU\"\n",
              " memory_limit: 17179869184\n",
              " locality {\n",
              " }\n",
              " incarnation: 5753797545820025716\n",
              " physical_device_desc: \"device: XLA_CPU device\", name: \"/device:XLA_GPU:0\"\n",
              " device_type: \"XLA_GPU\"\n",
              " memory_limit: 17179869184\n",
              " locality {\n",
              " }\n",
              " incarnation: 11796438139362907453\n",
              " physical_device_desc: \"device: XLA_GPU device\", name: \"/device:GPU:0\"\n",
              " device_type: \"GPU\"\n",
              " memory_limit: 7469983335\n",
              " locality {\n",
              "   bus_id: 1\n",
              "   links {\n",
              "   }\n",
              " }\n",
              " incarnation: 6602286234894235796\n",
              " physical_device_desc: \"device: 0, name: Tesla P4, pci bus id: 0000:00:04.0, compute capability: 6.1\"]"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 1
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "JicrNCBHU7gi",
        "colab_type": "code",
        "outputId": "6bc9d343-8a21-426d-cd83-84073fcdba31",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "print('hello world')"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "hello world\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "672rhZghXILx",
        "colab_type": "code",
        "outputId": "996be90e-dbf9-4325-e29c-4b3e379c9e57",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 286
        }
      },
      "source": [
        "!nvidia-smi"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Sat Feb 29 05:13:57 2020       \n",
            "+-----------------------------------------------------------------------------+\n",
            "| NVIDIA-SMI 440.48.02    Driver Version: 418.67       CUDA Version: 10.1     |\n",
            "|-------------------------------+----------------------+----------------------+\n",
            "| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |\n",
            "| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |\n",
            "|===============================+======================+======================|\n",
            "|   0  Tesla P4            Off  | 00000000:00:04.0 Off |                    0 |\n",
            "| N/A   53C    P0    25W /  75W |    115MiB /  7611MiB |      0%      Default |\n",
            "+-------------------------------+----------------------+----------------------+\n",
            "                                                                               \n",
            "+-----------------------------------------------------------------------------+\n",
            "| Processes:                                                       GPU Memory |\n",
            "|  GPU       PID   Type   Process name                             Usage      |\n",
            "|=============================================================================|\n",
            "+-----------------------------------------------------------------------------+\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "h5YjxaV3XQF_",
        "colab_type": "code",
        "outputId": "89b651ea-6dcd-4cbd-f576-06fd7b79247f",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 67
        }
      },
      "source": [
        "!ls sample_data"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "anscombe.json\t\t      mnist_test.csv\n",
            "california_housing_test.csv   mnist_train_small.csv\n",
            "california_housing_train.csv  README.md\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "A3VRlNnSYlhY",
        "colab_type": "code",
        "outputId": "30ce6398-cd2f-4ed6-8979-4c1c6c93251f",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 121
        }
      },
      "source": [
        "from google.colab import drive\n",
        "drive.mount('/content/drive')"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Go to this URL in a browser: https://accounts.google.com/o/oauth2/auth?client_id=947318989803-6bn6qk8qdgf4n4g3pfee6491hc0brc4i.apps.googleusercontent.com&redirect_uri=urn%3aietf%3awg%3aoauth%3a2.0%3aoob&response_type=code&scope=email%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdocs.test%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive.photos.readonly%20https%3a%2f%2fwww.googleapis.com%2fauth%2fpeopleapi.readonly\n",
            "\n",
            "Enter your authorization code:\n",
            "··········\n",
            "Mounted at /content/drive\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "JchLJixxZt09",
        "colab_type": "code",
        "outputId": "97ee2bc5-27ba-47ec-9af2-72a347d25a0b",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "!ls"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "drive  sample_data\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "PFp0scBJZz3O",
        "colab_type": "code",
        "outputId": "4ad75bb2-64d9-4ea7-9498-4594798e21b9",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        }
      },
      "source": [
        "!pip list"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Package                  Version        \n",
            "------------------------ ---------------\n",
            "absl-py                  0.9.0          \n",
            "alabaster                0.7.12         \n",
            "albumentations           0.1.12         \n",
            "altair                   4.0.1          \n",
            "asgiref                  3.2.3          \n",
            "astor                    0.8.1          \n",
            "astropy                  4.0            \n",
            "atari-py                 0.2.6          \n",
            "atomicwrites             1.3.0          \n",
            "attrs                    19.3.0         \n",
            "audioread                2.1.8          \n",
            "autograd                 1.3            \n",
            "Babel                    2.8.0          \n",
            "backcall                 0.1.0          \n",
            "backports.tempfile       1.0            \n",
            "backports.weakref        1.0.post1      \n",
            "beautifulsoup4           4.6.3          \n",
            "bleach                   3.1.0          \n",
            "blis                     0.2.4          \n",
            "bokeh                    1.4.0          \n",
            "boto                     2.49.0         \n",
            "boto3                    1.11.15        \n",
            "botocore                 1.14.15        \n",
            "Bottleneck               1.3.1          \n",
            "branca                   0.3.1          \n",
            "bs4                      0.0.1          \n",
            "bz2file                  0.98           \n",
            "cachetools               3.1.1          \n",
            "certifi                  2019.11.28     \n",
            "cffi                     1.14.0         \n",
            "chainer                  6.5.0          \n",
            "chardet                  3.0.4          \n",
            "chart-studio             1.0.0          \n",
            "Click                    7.0            \n",
            "cloudpickle              1.2.2          \n",
            "cmake                    3.12.0         \n",
            "colorlover               0.3.0          \n",
            "community                1.0.0b1        \n",
            "contextlib2              0.5.5          \n",
            "convertdate              2.2.0          \n",
            "coverage                 3.7.1          \n",
            "coveralls                0.5            \n",
            "crcmod                   1.7            \n",
            "cufflinks                0.17.0         \n",
            "cupy-cuda101             6.5.0          \n",
            "cvxopt                   1.2.4          \n",
            "cvxpy                    1.0.25         \n",
            "cycler                   0.10.0         \n",
            "cymem                    2.0.3          \n",
            "Cython                   0.29.15        \n",
            "daft                     0.0.4          \n",
            "dask                     2.9.2          \n",
            "dataclasses              0.7            \n",
            "datascience              0.10.6         \n",
            "decorator                4.4.1          \n",
            "defusedxml               0.6.0          \n",
            "descartes                1.1.0          \n",
            "dill                     0.3.1.1        \n",
            "distributed              1.25.3         \n",
            "Django                   3.0.3          \n",
            "dlib                     19.18.0        \n",
            "dm-sonnet                1.35           \n",
            "docopt                   0.6.2          \n",
            "docutils                 0.15.2         \n",
            "dopamine-rl              1.0.5          \n",
            "earthengine-api          0.1.213        \n",
            "easydict                 1.9            \n",
            "ecos                     2.0.7.post1    \n",
            "editdistance             0.5.3          \n",
            "en-core-web-sm           2.1.0          \n",
            "entrypoints              0.3            \n",
            "et-xmlfile               1.0.1          \n",
            "fa2                      0.3.5          \n",
            "fancyimpute              0.4.3          \n",
            "fastai                   1.0.60         \n",
            "fastdtw                  0.3.4          \n",
            "fastprogress             0.2.2          \n",
            "fastrlock                0.4            \n",
            "fbprophet                0.5            \n",
            "feather-format           0.4.0          \n",
            "featuretools             0.4.1          \n",
            "filelock                 3.0.12         \n",
            "fix-yahoo-finance        0.0.22         \n",
            "Flask                    1.1.1          \n",
            "folium                   0.8.3          \n",
            "fsspec                   0.6.2          \n",
            "future                   0.16.0         \n",
            "gast                     0.2.2          \n",
            "GDAL                     2.2.2          \n",
            "gdown                    3.6.4          \n",
            "gensim                   3.6.0          \n",
            "geographiclib            1.50           \n",
            "geopy                    1.17.0         \n",
            "gevent                   1.4.0          \n",
            "gin-config               0.3.0          \n",
            "glob2                    0.7            \n",
            "google                   2.0.3          \n",
            "google-api-core          1.16.0         \n",
            "google-api-python-client 1.7.11         \n",
            "google-auth              1.7.2          \n",
            "google-auth-httplib2     0.0.3          \n",
            "google-auth-oauthlib     0.4.1          \n",
            "google-cloud-bigquery    1.21.0         \n",
            "google-cloud-core        1.0.3          \n",
            "google-cloud-datastore   1.8.0          \n",
            "google-cloud-language    1.2.0          \n",
            "google-cloud-storage     1.16.2         \n",
            "google-cloud-translate   1.5.0          \n",
            "google-colab             1.0.0          \n",
            "google-pasta             0.1.8          \n",
            "google-resumable-media   0.4.1          \n",
            "googleapis-common-protos 1.51.0         \n",
            "googledrivedownloader    0.4            \n",
            "graph-nets               1.0.5          \n",
            "graphviz                 0.10.1         \n",
            "greenlet                 0.4.15         \n",
            "grpcio                   1.27.1         \n",
            "gspread                  3.0.1          \n",
            "gspread-dataframe        3.0.4          \n",
            "gunicorn                 20.0.4         \n",
            "gym                      0.15.6         \n",
            "h5py                     2.8.0          \n",
            "HeapDict                 1.0.1          \n",
            "holidays                 0.9.12         \n",
            "html5lib                 1.0.1          \n",
            "httpimport               0.5.18         \n",
            "httplib2                 0.11.3         \n",
            "httplib2shim             0.0.3          \n",
            "humanize                 0.5.1          \n",
            "hyperopt                 0.1.2          \n",
            "ideep4py                 2.0.0.post3    \n",
            "idna                     2.8            \n",
            "image                    1.5.28         \n",
            "imageio                  2.4.1          \n",
            "imagesize                1.2.0          \n",
            "imbalanced-learn         0.4.3          \n",
            "imblearn                 0.0            \n",
            "imgaug                   0.2.9          \n",
            "importlib-metadata       1.5.0          \n",
            "imutils                  0.5.3          \n",
            "inflect                  2.1.0          \n",
            "intel-openmp             2020.0.133     \n",
            "intervaltree             2.1.0          \n",
            "ipykernel                4.6.1          \n",
            "ipython                  5.5.0          \n",
            "ipython-genutils         0.2.0          \n",
            "ipython-sql              0.3.9          \n",
            "ipywidgets               7.5.1          \n",
            "itsdangerous             1.1.0          \n",
            "jax                      0.1.58         \n",
            "jaxlib                   0.1.38         \n",
            "jdcal                    1.4.1          \n",
            "jedi                     0.16.0         \n",
            "jieba                    0.42.1         \n",
            "Jinja2                   2.11.1         \n",
            "jmespath                 0.9.4          \n",
            "joblib                   0.14.1         \n",
            "jpeg4py                  0.1.4          \n",
            "jsonschema               2.6.0          \n",
            "jupyter                  1.0.0          \n",
            "jupyter-client           5.3.4          \n",
            "jupyter-console          5.2.0          \n",
            "jupyter-core             4.6.2          \n",
            "kaggle                   1.5.6          \n",
            "kapre                    0.1.3.1        \n",
            "Keras                    2.2.5          \n",
            "Keras-Applications       1.0.8          \n",
            "Keras-Preprocessing      1.1.0          \n",
            "keras-vis                0.4.1          \n",
            "kfac                     0.2.0          \n",
            "kiwisolver               1.1.0          \n",
            "knnimpute                0.1.0          \n",
            "librosa                  0.6.3          \n",
            "lightgbm                 2.2.3          \n",
            "llvmlite                 0.31.0         \n",
            "lmdb                     0.98           \n",
            "lucid                    0.3.8          \n",
            "lunardate                0.2.0          \n",
            "lxml                     4.2.6          \n",
            "magenta                  0.3.19         \n",
            "Markdown                 3.2.1          \n",
            "MarkupSafe               1.1.1          \n",
            "matplotlib               3.1.3          \n",
            "matplotlib-venn          0.11.5         \n",
            "mesh-tensorflow          0.1.9          \n",
            "mido                     1.2.6          \n",
            "mir-eval                 0.5            \n",
            "missingno                0.4.2          \n",
            "mistune                  0.8.4          \n",
            "mizani                   0.6.0          \n",
            "mkl                      2019.0         \n",
            "mlxtend                  0.14.0         \n",
            "more-itertools           8.2.0          \n",
            "moviepy                  0.2.3.5        \n",
            "mpi4py                   3.0.3          \n",
            "mpmath                   1.1.0          \n",
            "msgpack                  0.5.6          \n",
            "multiprocess             0.70.9         \n",
            "multitasking             0.0.9          \n",
            "murmurhash               1.0.2          \n",
            "music21                  5.5.0          \n",
            "natsort                  5.5.0          \n",
            "nbconvert                5.6.1          \n",
            "nbformat                 5.0.4          \n",
            "networkx                 2.4            \n",
            "nibabel                  2.3.3          \n",
            "nltk                     3.2.5          \n",
            "notebook                 5.2.2          \n",
            "np-utils                 0.5.12.1       \n",
            "numba                    0.47.0         \n",
            "numexpr                  2.7.1          \n",
            "numpy                    1.17.5         \n",
            "nvidia-ml-py3            7.352.0        \n",
            "oauth2client             4.1.3          \n",
            "oauthlib                 3.1.0          \n",
            "okgrade                  0.4.3          \n",
            "opencv-contrib-python    4.1.2.30       \n",
            "opencv-python            4.1.2.30       \n",
            "openpyxl                 2.5.9          \n",
            "opt-einsum               3.1.0          \n",
            "osqp                     0.6.1          \n",
            "packaging                20.1           \n",
            "palettable               3.3.0          \n",
            "pandas                   0.25.3         \n",
            "pandas-datareader        0.7.4          \n",
            "pandas-gbq               0.11.0         \n",
            "pandas-profiling         1.4.1          \n",
            "pandocfilters            1.4.2          \n",
            "parso                    0.6.1          \n",
            "pathlib                  1.0.1          \n",
            "patsy                    0.5.1          \n",
            "pexpect                  4.8.0          \n",
            "pickleshare              0.7.5          \n",
            "Pillow                   6.2.2          \n",
            "pip                      19.3.1         \n",
            "pip-tools                4.2.0          \n",
            "plac                     0.9.6          \n",
            "plotly                   4.4.1          \n",
            "plotnine                 0.6.0          \n",
            "pluggy                   0.7.1          \n",
            "portpicker               1.3.1          \n",
            "prefetch-generator       1.0.1          \n",
            "preshed                  2.0.1          \n",
            "pretty-midi              0.2.8          \n",
            "prettytable              0.7.2          \n",
            "progressbar2             3.38.0         \n",
            "prometheus-client        0.7.1          \n",
            "promise                  2.3            \n",
            "prompt-toolkit           1.0.18         \n",
            "protobuf                 3.10.0         \n",
            "psutil                   5.4.8          \n",
            "psycopg2                 2.7.6.1        \n",
            "ptyprocess               0.6.0          \n",
            "py                       1.8.1          \n",
            "pyarrow                  0.14.1         \n",
            "pyasn1                   0.4.8          \n",
            "pyasn1-modules           0.2.8          \n",
            "pycocotools              2.0.0          \n",
            "pycparser                2.19           \n",
            "pydata-google-auth       0.3.0          \n",
            "pydot                    1.3.0          \n",
            "pydot-ng                 2.0.0          \n",
            "pydotplus                2.0.2          \n",
            "PyDrive                  1.3.1          \n",
            "pyemd                    0.5.1          \n",
            "pyglet                   1.4.10         \n",
            "Pygments                 2.1.3          \n",
            "pygobject                3.26.1         \n",
            "pymc3                    3.7            \n",
            "PyMeeus                  0.3.6          \n",
            "pymongo                  3.10.1         \n",
            "pymystem3                0.2.0          \n",
            "PyOpenGL                 3.1.5          \n",
            "pyparsing                2.4.6          \n",
            "pypng                    0.0.20         \n",
            "pyrsistent               0.15.7         \n",
            "pysndfile                1.3.8          \n",
            "PySocks                  1.7.1          \n",
            "pystan                   2.19.1.1       \n",
            "pytest                   3.6.4          \n",
            "python-apt               1.6.5+ubuntu0.2\n",
            "python-chess             0.23.11        \n",
            "python-dateutil          2.6.1          \n",
            "python-louvain           0.13           \n",
            "python-rtmidi            1.4.0          \n",
            "python-slugify           4.0.0          \n",
            "python-utils             2.3.0          \n",
            "pytz                     2018.9         \n",
            "PyWavelets               1.1.1          \n",
            "PyYAML                   3.13           \n",
            "pyzmq                    17.0.0         \n",
            "qtconsole                4.6.0          \n",
            "regex                    2019.12.20     \n",
            "requests                 2.21.0         \n",
            "requests-oauthlib        1.3.0          \n",
            "resampy                  0.2.2          \n",
            "retrying                 1.3.3          \n",
            "rpy2                     2.9.5          \n",
            "rsa                      4.0            \n",
            "s3fs                     0.4.0          \n",
            "s3transfer               0.3.3          \n",
            "scikit-image             0.16.2         \n",
            "scikit-learn             0.22.1         \n",
            "scipy                    1.4.1          \n",
            "screen-resolution-extra  0.0.0          \n",
            "scs                      2.1.1.post2    \n",
            "seaborn                  0.10.0         \n",
            "semantic-version         2.8.4          \n",
            "Send2Trash               1.5.0          \n",
            "setuptools               45.1.0         \n",
            "setuptools-git           1.2            \n",
            "Shapely                  1.7.0          \n",
            "simplegeneric            0.8.1          \n",
            "six                      1.12.0         \n",
            "sklearn                  0.0            \n",
            "sklearn-pandas           1.8.0          \n",
            "smart-open               1.9.0          \n",
            "snowballstemmer          2.0.0          \n",
            "sortedcontainers         2.1.0          \n",
            "spacy                    2.1.9          \n",
            "Sphinx                   1.8.5          \n",
            "sphinxcontrib-websupport 1.2.0          \n",
            "SQLAlchemy               1.3.13         \n",
            "sqlparse                 0.3.0          \n",
            "srsly                    1.0.1          \n",
            "stable-baselines         2.2.1          \n",
            "statsmodels              0.10.2         \n",
            "sympy                    1.1.1          \n",
            "tables                   3.4.4          \n",
            "tabulate                 0.8.6          \n",
            "tblib                    1.6.0          \n",
            "tensor2tensor            1.14.1         \n",
            "tensorboard              1.15.0         \n",
            "tensorboardcolab         0.0.22         \n",
            "tensorflow               1.15.0         \n",
            "tensorflow-datasets      2.0.0          \n",
            "tensorflow-estimator     1.15.1         \n",
            "tensorflow-gan           2.0.0          \n",
            "tensorflow-hub           0.7.0          \n",
            "tensorflow-metadata      0.21.1         \n",
            "tensorflow-privacy       0.2.2          \n",
            "tensorflow-probability   0.7.0          \n",
            "termcolor                1.1.0          \n",
            "terminado                0.8.3          \n",
            "testpath                 0.4.4          \n",
            "text-unidecode           1.3            \n",
            "textblob                 0.15.3         \n",
            "textgenrnn               1.4.1          \n",
            "tflearn                  0.3.2          \n",
            "Theano                   1.0.4          \n",
            "thinc                    7.0.8          \n",
            "toolz                    0.10.0         \n",
            "torch                    1.4.0          \n",
            "torchsummary             1.5.1          \n",
            "torchtext                0.3.1          \n",
            "torchvision              0.5.0          \n",
            "tornado                  4.5.3          \n",
            "tqdm                     4.28.1         \n",
            "traitlets                4.3.3          \n",
            "tweepy                   3.6.0          \n",
            "typing                   3.6.6          \n",
            "typing-extensions        3.6.6          \n",
            "tzlocal                  1.5.1          \n",
            "umap-learn               0.3.10         \n",
            "uritemplate              3.0.1          \n",
            "urllib3                  1.24.3         \n",
            "vega-datasets            0.8.0          \n",
            "wasabi                   0.6.0          \n",
            "wcwidth                  0.1.8          \n",
            "webencodings             0.5.1          \n",
            "Werkzeug                 1.0.0          \n",
            "wheel                    0.34.2         \n",
            "widgetsnbextension       3.5.1          \n",
            "wordcloud                1.5.0          \n",
            "wrapt                    1.11.2         \n",
            "xarray                   0.14.1         \n",
            "xgboost                  0.90           \n",
            "xkit                     0.0.0          \n",
            "xlrd                     1.1.0          \n",
            "xlwt                     1.3.0          \n",
            "yellowbrick              0.9.1          \n",
            "zict                     1.0.0          \n",
            "zipp                     3.0.0          \n",
            "zmq                      0.0.0          \n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "UfkRmO6SZ3pl",
        "colab_type": "code",
        "outputId": "0444948a-9064-4e55-e6ae-5e813220d5be",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        }
      },
      "source": [
        "!pip3 list"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Package                  Version        \n",
            "------------------------ ---------------\n",
            "absl-py                  0.9.0          \n",
            "alabaster                0.7.12         \n",
            "albumentations           0.1.12         \n",
            "altair                   4.0.1          \n",
            "asgiref                  3.2.3          \n",
            "astor                    0.8.1          \n",
            "astropy                  4.0            \n",
            "atari-py                 0.2.6          \n",
            "atomicwrites             1.3.0          \n",
            "attrs                    19.3.0         \n",
            "audioread                2.1.8          \n",
            "autograd                 1.3            \n",
            "Babel                    2.8.0          \n",
            "backcall                 0.1.0          \n",
            "backports.tempfile       1.0            \n",
            "backports.weakref        1.0.post1      \n",
            "beautifulsoup4           4.6.3          \n",
            "bleach                   3.1.0          \n",
            "blis                     0.2.4          \n",
            "bokeh                    1.4.0          \n",
            "boto                     2.49.0         \n",
            "boto3                    1.11.15        \n",
            "botocore                 1.14.15        \n",
            "Bottleneck               1.3.1          \n",
            "branca                   0.3.1          \n",
            "bs4                      0.0.1          \n",
            "bz2file                  0.98           \n",
            "cachetools               3.1.1          \n",
            "certifi                  2019.11.28     \n",
            "cffi                     1.14.0         \n",
            "chainer                  6.5.0          \n",
            "chardet                  3.0.4          \n",
            "chart-studio             1.0.0          \n",
            "Click                    7.0            \n",
            "cloudpickle              1.2.2          \n",
            "cmake                    3.12.0         \n",
            "colorlover               0.3.0          \n",
            "community                1.0.0b1        \n",
            "contextlib2              0.5.5          \n",
            "convertdate              2.2.0          \n",
            "coverage                 3.7.1          \n",
            "coveralls                0.5            \n",
            "crcmod                   1.7            \n",
            "cufflinks                0.17.0         \n",
            "cupy-cuda101             6.5.0          \n",
            "cvxopt                   1.2.4          \n",
            "cvxpy                    1.0.25         \n",
            "cycler                   0.10.0         \n",
            "cymem                    2.0.3          \n",
            "Cython                   0.29.15        \n",
            "daft                     0.0.4          \n",
            "dask                     2.9.2          \n",
            "dataclasses              0.7            \n",
            "datascience              0.10.6         \n",
            "decorator                4.4.1          \n",
            "defusedxml               0.6.0          \n",
            "descartes                1.1.0          \n",
            "dill                     0.3.1.1        \n",
            "distributed              1.25.3         \n",
            "Django                   3.0.3          \n",
            "dlib                     19.18.0        \n",
            "dm-sonnet                1.35           \n",
            "docopt                   0.6.2          \n",
            "docutils                 0.15.2         \n",
            "dopamine-rl              1.0.5          \n",
            "earthengine-api          0.1.213        \n",
            "easydict                 1.9            \n",
            "ecos                     2.0.7.post1    \n",
            "editdistance             0.5.3          \n",
            "en-core-web-sm           2.1.0          \n",
            "entrypoints              0.3            \n",
            "et-xmlfile               1.0.1          \n",
            "fa2                      0.3.5          \n",
            "fancyimpute              0.4.3          \n",
            "fastai                   1.0.60         \n",
            "fastdtw                  0.3.4          \n",
            "fastprogress             0.2.2          \n",
            "fastrlock                0.4            \n",
            "fbprophet                0.5            \n",
            "feather-format           0.4.0          \n",
            "featuretools             0.4.1          \n",
            "filelock                 3.0.12         \n",
            "fix-yahoo-finance        0.0.22         \n",
            "Flask                    1.1.1          \n",
            "folium                   0.8.3          \n",
            "fsspec                   0.6.2          \n",
            "future                   0.16.0         \n",
            "gast                     0.2.2          \n",
            "GDAL                     2.2.2          \n",
            "gdown                    3.6.4          \n",
            "gensim                   3.6.0          \n",
            "geographiclib            1.50           \n",
            "geopy                    1.17.0         \n",
            "gevent                   1.4.0          \n",
            "gin-config               0.3.0          \n",
            "glob2                    0.7            \n",
            "google                   2.0.3          \n",
            "google-api-core          1.16.0         \n",
            "google-api-python-client 1.7.11         \n",
            "google-auth              1.7.2          \n",
            "google-auth-httplib2     0.0.3          \n",
            "google-auth-oauthlib     0.4.1          \n",
            "google-cloud-bigquery    1.21.0         \n",
            "google-cloud-core        1.0.3          \n",
            "google-cloud-datastore   1.8.0          \n",
            "google-cloud-language    1.2.0          \n",
            "google-cloud-storage     1.16.2         \n",
            "google-cloud-translate   1.5.0          \n",
            "google-colab             1.0.0          \n",
            "google-pasta             0.1.8          \n",
            "google-resumable-media   0.4.1          \n",
            "googleapis-common-protos 1.51.0         \n",
            "googledrivedownloader    0.4            \n",
            "graph-nets               1.0.5          \n",
            "graphviz                 0.10.1         \n",
            "greenlet                 0.4.15         \n",
            "grpcio                   1.27.1         \n",
            "gspread                  3.0.1          \n",
            "gspread-dataframe        3.0.4          \n",
            "gunicorn                 20.0.4         \n",
            "gym                      0.15.6         \n",
            "h5py                     2.8.0          \n",
            "HeapDict                 1.0.1          \n",
            "holidays                 0.9.12         \n",
            "html5lib                 1.0.1          \n",
            "httpimport               0.5.18         \n",
            "httplib2                 0.11.3         \n",
            "httplib2shim             0.0.3          \n",
            "humanize                 0.5.1          \n",
            "hyperopt                 0.1.2          \n",
            "ideep4py                 2.0.0.post3    \n",
            "idna                     2.8            \n",
            "image                    1.5.28         \n",
            "imageio                  2.4.1          \n",
            "imagesize                1.2.0          \n",
            "imbalanced-learn         0.4.3          \n",
            "imblearn                 0.0            \n",
            "imgaug                   0.2.9          \n",
            "importlib-metadata       1.5.0          \n",
            "imutils                  0.5.3          \n",
            "inflect                  2.1.0          \n",
            "intel-openmp             2020.0.133     \n",
            "intervaltree             2.1.0          \n",
            "ipykernel                4.6.1          \n",
            "ipython                  5.5.0          \n",
            "ipython-genutils         0.2.0          \n",
            "ipython-sql              0.3.9          \n",
            "ipywidgets               7.5.1          \n",
            "itsdangerous             1.1.0          \n",
            "jax                      0.1.58         \n",
            "jaxlib                   0.1.38         \n",
            "jdcal                    1.4.1          \n",
            "jedi                     0.16.0         \n",
            "jieba                    0.42.1         \n",
            "Jinja2                   2.11.1         \n",
            "jmespath                 0.9.4          \n",
            "joblib                   0.14.1         \n",
            "jpeg4py                  0.1.4          \n",
            "jsonschema               2.6.0          \n",
            "jupyter                  1.0.0          \n",
            "jupyter-client           5.3.4          \n",
            "jupyter-console          5.2.0          \n",
            "jupyter-core             4.6.2          \n",
            "kaggle                   1.5.6          \n",
            "kapre                    0.1.3.1        \n",
            "Keras                    2.2.5          \n",
            "Keras-Applications       1.0.8          \n",
            "Keras-Preprocessing      1.1.0          \n",
            "keras-vis                0.4.1          \n",
            "kfac                     0.2.0          \n",
            "kiwisolver               1.1.0          \n",
            "knnimpute                0.1.0          \n",
            "librosa                  0.6.3          \n",
            "lightgbm                 2.2.3          \n",
            "llvmlite                 0.31.0         \n",
            "lmdb                     0.98           \n",
            "lucid                    0.3.8          \n",
            "lunardate                0.2.0          \n",
            "lxml                     4.2.6          \n",
            "magenta                  0.3.19         \n",
            "Markdown                 3.2.1          \n",
            "MarkupSafe               1.1.1          \n",
            "matplotlib               3.1.3          \n",
            "matplotlib-venn          0.11.5         \n",
            "mesh-tensorflow          0.1.9          \n",
            "mido                     1.2.6          \n",
            "mir-eval                 0.5            \n",
            "missingno                0.4.2          \n",
            "mistune                  0.8.4          \n",
            "mizani                   0.6.0          \n",
            "mkl                      2019.0         \n",
            "mlxtend                  0.14.0         \n",
            "more-itertools           8.2.0          \n",
            "moviepy                  0.2.3.5        \n",
            "mpi4py                   3.0.3          \n",
            "mpmath                   1.1.0          \n",
            "msgpack                  0.5.6          \n",
            "multiprocess             0.70.9         \n",
            "multitasking             0.0.9          \n",
            "murmurhash               1.0.2          \n",
            "music21                  5.5.0          \n",
            "natsort                  5.5.0          \n",
            "nbconvert                5.6.1          \n",
            "nbformat                 5.0.4          \n",
            "networkx                 2.4            \n",
            "nibabel                  2.3.3          \n",
            "nltk                     3.2.5          \n",
            "notebook                 5.2.2          \n",
            "np-utils                 0.5.12.1       \n",
            "numba                    0.47.0         \n",
            "numexpr                  2.7.1          \n",
            "numpy                    1.17.5         \n",
            "nvidia-ml-py3            7.352.0        \n",
            "oauth2client             4.1.3          \n",
            "oauthlib                 3.1.0          \n",
            "okgrade                  0.4.3          \n",
            "opencv-contrib-python    4.1.2.30       \n",
            "opencv-python            4.1.2.30       \n",
            "openpyxl                 2.5.9          \n",
            "opt-einsum               3.1.0          \n",
            "osqp                     0.6.1          \n",
            "packaging                20.1           \n",
            "palettable               3.3.0          \n",
            "pandas                   0.25.3         \n",
            "pandas-datareader        0.7.4          \n",
            "pandas-gbq               0.11.0         \n",
            "pandas-profiling         1.4.1          \n",
            "pandocfilters            1.4.2          \n",
            "parso                    0.6.1          \n",
            "pathlib                  1.0.1          \n",
            "patsy                    0.5.1          \n",
            "pexpect                  4.8.0          \n",
            "pickleshare              0.7.5          \n",
            "Pillow                   6.2.2          \n",
            "pip                      19.3.1         \n",
            "pip-tools                4.2.0          \n",
            "plac                     0.9.6          \n",
            "plotly                   4.4.1          \n",
            "plotnine                 0.6.0          \n",
            "pluggy                   0.7.1          \n",
            "portpicker               1.3.1          \n",
            "prefetch-generator       1.0.1          \n",
            "preshed                  2.0.1          \n",
            "pretty-midi              0.2.8          \n",
            "prettytable              0.7.2          \n",
            "progressbar2             3.38.0         \n",
            "prometheus-client        0.7.1          \n",
            "promise                  2.3            \n",
            "prompt-toolkit           1.0.18         \n",
            "protobuf                 3.10.0         \n",
            "psutil                   5.4.8          \n",
            "psycopg2                 2.7.6.1        \n",
            "ptyprocess               0.6.0          \n",
            "py                       1.8.1          \n",
            "pyarrow                  0.14.1         \n",
            "pyasn1                   0.4.8          \n",
            "pyasn1-modules           0.2.8          \n",
            "pycocotools              2.0.0          \n",
            "pycparser                2.19           \n",
            "pydata-google-auth       0.3.0          \n",
            "pydot                    1.3.0          \n",
            "pydot-ng                 2.0.0          \n",
            "pydotplus                2.0.2          \n",
            "PyDrive                  1.3.1          \n",
            "pyemd                    0.5.1          \n",
            "pyglet                   1.4.10         \n",
            "Pygments                 2.1.3          \n",
            "pygobject                3.26.1         \n",
            "pymc3                    3.7            \n",
            "PyMeeus                  0.3.6          \n",
            "pymongo                  3.10.1         \n",
            "pymystem3                0.2.0          \n",
            "PyOpenGL                 3.1.5          \n",
            "pyparsing                2.4.6          \n",
            "pypng                    0.0.20         \n",
            "pyrsistent               0.15.7         \n",
            "pysndfile                1.3.8          \n",
            "PySocks                  1.7.1          \n",
            "pystan                   2.19.1.1       \n",
            "pytest                   3.6.4          \n",
            "python-apt               1.6.5+ubuntu0.2\n",
            "python-chess             0.23.11        \n",
            "python-dateutil          2.6.1          \n",
            "python-louvain           0.13           \n",
            "python-rtmidi            1.4.0          \n",
            "python-slugify           4.0.0          \n",
            "python-utils             2.3.0          \n",
            "pytz                     2018.9         \n",
            "PyWavelets               1.1.1          \n",
            "PyYAML                   3.13           \n",
            "pyzmq                    17.0.0         \n",
            "qtconsole                4.6.0          \n",
            "regex                    2019.12.20     \n",
            "requests                 2.21.0         \n",
            "requests-oauthlib        1.3.0          \n",
            "resampy                  0.2.2          \n",
            "retrying                 1.3.3          \n",
            "rpy2                     2.9.5          \n",
            "rsa                      4.0            \n",
            "s3fs                     0.4.0          \n",
            "s3transfer               0.3.3          \n",
            "scikit-image             0.16.2         \n",
            "scikit-learn             0.22.1         \n",
            "scipy                    1.4.1          \n",
            "screen-resolution-extra  0.0.0          \n",
            "scs                      2.1.1.post2    \n",
            "seaborn                  0.10.0         \n",
            "semantic-version         2.8.4          \n",
            "Send2Trash               1.5.0          \n",
            "setuptools               45.1.0         \n",
            "setuptools-git           1.2            \n",
            "Shapely                  1.7.0          \n",
            "simplegeneric            0.8.1          \n",
            "six                      1.12.0         \n",
            "sklearn                  0.0            \n",
            "sklearn-pandas           1.8.0          \n",
            "smart-open               1.9.0          \n",
            "snowballstemmer          2.0.0          \n",
            "sortedcontainers         2.1.0          \n",
            "spacy                    2.1.9          \n",
            "Sphinx                   1.8.5          \n",
            "sphinxcontrib-websupport 1.2.0          \n",
            "SQLAlchemy               1.3.13         \n",
            "sqlparse                 0.3.0          \n",
            "srsly                    1.0.1          \n",
            "stable-baselines         2.2.1          \n",
            "statsmodels              0.10.2         \n",
            "sympy                    1.1.1          \n",
            "tables                   3.4.4          \n",
            "tabulate                 0.8.6          \n",
            "tblib                    1.6.0          \n",
            "tensor2tensor            1.14.1         \n",
            "tensorboard              1.15.0         \n",
            "tensorboardcolab         0.0.22         \n",
            "tensorflow               1.15.0         \n",
            "tensorflow-datasets      2.0.0          \n",
            "tensorflow-estimator     1.15.1         \n",
            "tensorflow-gan           2.0.0          \n",
            "tensorflow-hub           0.7.0          \n",
            "tensorflow-metadata      0.21.1         \n",
            "tensorflow-privacy       0.2.2          \n",
            "tensorflow-probability   0.7.0          \n",
            "termcolor                1.1.0          \n",
            "terminado                0.8.3          \n",
            "testpath                 0.4.4          \n",
            "text-unidecode           1.3            \n",
            "textblob                 0.15.3         \n",
            "textgenrnn               1.4.1          \n",
            "tflearn                  0.3.2          \n",
            "Theano                   1.0.4          \n",
            "thinc                    7.0.8          \n",
            "toolz                    0.10.0         \n",
            "torch                    1.4.0          \n",
            "torchsummary             1.5.1          \n",
            "torchtext                0.3.1          \n",
            "torchvision              0.5.0          \n",
            "tornado                  4.5.3          \n",
            "tqdm                     4.28.1         \n",
            "traitlets                4.3.3          \n",
            "tweepy                   3.6.0          \n",
            "typing                   3.6.6          \n",
            "typing-extensions        3.6.6          \n",
            "tzlocal                  1.5.1          \n",
            "umap-learn               0.3.10         \n",
            "uritemplate              3.0.1          \n",
            "urllib3                  1.24.3         \n",
            "vega-datasets            0.8.0          \n",
            "wasabi                   0.6.0          \n",
            "wcwidth                  0.1.8          \n",
            "webencodings             0.5.1          \n",
            "Werkzeug                 1.0.0          \n",
            "wheel                    0.34.2         \n",
            "widgetsnbextension       3.5.1          \n",
            "wordcloud                1.5.0          \n",
            "wrapt                    1.11.2         \n",
            "xarray                   0.14.1         \n",
            "xgboost                  0.90           \n",
            "xkit                     0.0.0          \n",
            "xlrd                     1.1.0          \n",
            "xlwt                     1.3.0          \n",
            "yellowbrick              0.9.1          \n",
            "zict                     1.0.0          \n",
            "zipp                     3.0.0          \n",
            "zmq                      0.0.0          \n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "kxWTgFEpaRqi",
        "colab_type": "code",
        "outputId": "24506979-45db-4257-f2ef-f7e7c299df67",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 84
        }
      },
      "source": [
        "!which python\n",
        "!python2 --version\n",
        "!python3 --version\n",
        "!python --version"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "/usr/local/bin/python\n",
            "Python 2.7.17\n",
            "Python 3.6.9\n",
            "Python 3.6.9\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "M7wCL_FFagGB",
        "colab_type": "code",
        "outputId": "38df02b7-f0f0-4a3c-985e-30b06926e5c8",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 134
        }
      },
      "source": [
        "!pwd\n",
        "import os\n",
        "os.chdir(\"/content/drive/My Drive/Colab Notebooks/\")\n",
        "!pwd\n",
        "!cd ../../\n",
        "!pwd\n",
        "!cd /\n",
        "!pwd\n",
        "!whoami\n",
        "!w"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "/content/drive/My Drive/Colab Notebooks\n",
            "/content/drive/My Drive/Colab Notebooks\n",
            "/content/drive/My Drive/Colab Notebooks\n",
            "/content/drive/My Drive/Colab Notebooks\n",
            "root\n",
            " 05:33:13 up 50 min,  0 users,  load average: 0.00, 0.00, 0.00\n",
            "USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "kYVZh0SYc6fj",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 202
        },
        "outputId": "09b22917-da81-4032-ba50-943955cbb10e"
      },
      "source": [
        "!wget baidu.com"
      ],
      "execution_count": 21,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "--2020-02-29 05:51:15--  http://baidu.com/\n",
            "Resolving baidu.com (baidu.com)... 220.181.38.148, 39.156.69.79\n",
            "Connecting to baidu.com (baidu.com)|220.181.38.148|:80... connected.\n",
            "HTTP request sent, awaiting response... 200 OK\n",
            "Length: 81 [text/html]\n",
            "Saving to: ‘index.html’\n",
            "\n",
            "\rindex.html            0%[                    ]       0  --.-KB/s               \rindex.html          100%[===================>]      81  --.-KB/s    in 0s      \n",
            "\n",
            "2020-02-29 05:51:16 (12.0 MB/s) - ‘index.html’ saved [81/81]\n",
            "\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "2AUQ-V9wf6bx",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        ""
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "kEIQCZRRf2p_",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        ""
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "azdXjvnGbhlb",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        ""
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "gJ2j0nbQabFQ",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        ""
      ],
      "execution_count": 0,
      "outputs": []
    }
  ]
}